<!-- <template>
	<view>
		<view class="container">
			<view class="head-input"><u-search placeholder="搜索" @change="hu" v-model="name"></u-search></view>
			<view class="head-nav"><u-tabs :list="listp" @click="click" @change="changs" :current="page"></u-tabs></view>
		</view>
		<view v-if="page == 0">
			<home ></home>
		</view>
		<view v-if="page == 1"><singer @singer="op"></singer></view>
		<view v-if="page == 2">22</view>
		<view v-if="page == 3">33</view>
		<view v-if="page == 4">44</view>
		<view v-if="page == 5">55</view>
		<view v-if="page == 6">66</view>
	</view>
</template>
<script>
import { mapState, mapMutations } from 'vuex';
import home from "../list/songall.vue"
import  singer from "./singer.vue"
import abuml from "./album.vue"
export default {
	components:{
		home,
		singer,
		abuml
	},
	data() {
		return {
			lists: '单曲',
			name: this.names,
			listp: [
				{
					name: '综合'
				},
				{
					name: '单曲'
				},
				{
					name: '歌单'
				},
				{
					name: '歌手'
				},
				{
					name: '专辑'
				},
				{
					name: '视频'
				},
				{
					name: '用户'
				}
			],
			page: 0
		};
	},
	onLoad(val) {
		this.name = val.name;
		this.hu();
		this.op()
	},
	methods: {
		op(val){
			console.log(val);
		},
		hu() {
			this.$emit('update:names', this.name);
			console.log(this.name);
		},
		changs(item) {
			this.page=item.index
			console.log(this.page);
		},
		click(item) {
			// switch (item.index) {
			// 	case 0:
			// 		uni.navigateTo({
			// 			url: `/views/list/songall?name=${this.name}`
			// 		});
			// 		break;
			// 	case 1:
			// 		uni.navigateTo({
			// 			url: `/views/list/singer?name=${this.name}`
			// 		});
			// 		break;
			// 	case 2:
			// 		uni.navigateTo({
			// 			url: `/views/list/playlist?name=${this.name}`
			// 		});
			// 		break;
			// 	case 3:
			// 		uni.navigateTo({
			// 			url: `/views/list/ar?name=${this.name}`
			// 		});
			// 		break;
			// 	case 4:
			// 		uni.navigateTo({
			// 			url: `/views/list/album?name=${this.name}`
			// 		});
			// 		break;
			// 	case 5:
			// 		uni.navigateTo({
			// 			url: `/views/list/video?name=${this.name}`
			// 		});
			// 		break;
			// 	case 6:
			// 		uni.navigateTo({
			// 			url: `/views/list/user?name=${this.name}`
			// 		});
			// 		break;
			// }
		}
	},
};
</script>
<style lang="scss" scoped>
.container {
	background-color: #f2f2f2;

	.head-input {
	}
	.head-nav {
		display: flex;
		margin-left: 30rpx;
		height: 60rpx;
		.list {
			flex: 0.3;
		}
		.act {
			color: red;
		}
	}
}
</style>
 -->